package com.lesama.generics;

/*
    泛型接口：
        实现类实现接口的时候确定具体的类型
 */

public class GenericsDemo4 {
    public static void main(String[] args) {
        InterAImpl interA = new InterAImpl();
        interA.show("谁把红尘一丝一缕磨成香");
        InterBImpl<Double> interB = new InterBImpl<>();
        interB.show(1354.15);
    }
}

interface Inter<E> {
    public void show(E e);
}

class InterAImpl implements Inter<String> {

    @Override
    public void show(String s) {
        System.out.println(s);
    }
}

class InterBImpl<E> implements Inter<E> {

    @Override
    public void show(E e) {
        System.out.println(e);
    }
}